/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package tiebreak.BL;

import com.microsoft.sqlserver.jdbc.SQLServerException;
import java.sql.SQLException;
import java.util.ArrayList;
import tiebreak.DAL.DalcTraining;
import tiebreak.BE.Member;
import tiebreak.BE.TrainingteamJoinTeam;
import tiebreak.be.Team;

/**
 *
 * @author henrikhansen
 */
public class Training {
    public static ArrayList<Member> getcoaches() throws SQLException
    {
        return DalcTraining.getAllCoaches();
    }

    public static ArrayList<TrainingteamJoinTeam> getTeamsInTraining() throws SQLException
    {
        return DalcTraining.getAllTeamsInTraining();
    }

    public static ArrayList<TrainingteamJoinTeam> getMembersByTeam(int teamID) throws SQLServerException, SQLException
    {
        return DalcTraining.getAllMembersByTeam(teamID);
    }

    public static ArrayList<TrainingteamJoinTeam> getAllMembersByTeam(int teamID) throws SQLException
    {
        return DalcTraining.getAllMembersByTeam(teamID);
    }

    public static ArrayList<TrainingteamJoinTeam> getAllTeamsInTraining() throws SQLException
    {
        return DalcTraining.getAllTeamsInTraining();
    }

    public static ArrayList<Team> getTeams() throws SQLException
    {
        return DalcTraining.getTeams();
    }

    public static void assignCoachToTeams(int teamID, int coachID, String desc) throws SQLException
    {
        DalcTraining.assignCoachToTeams(teamID, coachID, desc);
    }
}
